<div ng-include="'tpl/base/web/header.html'"></div>
<div ng-include="'tpl/base/web/search.html'"></div>

<div ng-controller="leftTab5" id="leftTab5" class="clearfix">
    <div ng-include="'tpl/base/web/leftTab.html'"></div>
    <div class="interface fl clearfix">

        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a onclick="return false;" href="#home" aria-controls="home"
                                                      role="tab" data-toggle="tab">耗材申请</a></li>

        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <div class="mask" ng-show="layerOutShow"></div>
            <!--耗材申请-->
            <div role="tabpanel" class="tab-pane active" id="home">
                <div class="merchantSearch">
                    <ul>
                        <li class="datePicker" style="width:100%;">

                            <span>申请时间：</span>
                            <!--下单时间控件-->
                            <div class="container">
                                <form action="" class="form-horizontal">
                                    <fieldset>
                                        <div class="control-group">
                                            <div class="controls input-append date form_date" data-date=""
                                                 data-date-format="yyyy-mm-dd" data-link-field="dtp_input1"
                                                 data-link-format="yyyy/mm/dd">
                                                <input class="containerInput" size="16" type="text" value="" readonly>
                                                <span style="min-width:15px;" class="add-on"><i class="icon-remove"></i></span>
                                                <span style="min-width:15px;" class="add-on"><i
                                                        class="icon-th"></i></span>
                                            </div>
                                            <input type="hidden" id="dtp_input1" class="dtpInput1" value=""/><br/>
                                        </div>
                                    </fieldset>
                                </form>
                            </div>
                            <span style="min-width:30px;text-align: center;height:30px;">-</span>
                            <div class="container">
                                <form action="" class="form-horizontal">
                                    <fieldset>
                                        <div class="control-group">
                                            <div class="controls input-append date form_date" data-date=""
                                                 data-date-format="yyyy-mm-dd" data-link-field="dtp_input2"
                                                 data-link-format="yyyy/mm/dd">
                                                <input class="containerInput" size="16" type="text" value="" readonly>
                                                <span style="min-width:15px;" class="add-on"><i class="icon-remove"></i></span>
                                                <span style="min-width:15px;" class="add-on"><i
                                                        class="icon-th"></i></span>
                                            </div>
                                            <input type="hidden" id="dtp_input2" class="dtpInput2" value=""/><br/>
                                        </div>
                                    </fieldset>
                                </form>
                            </div>
                            <!--时间控件  end-->


                        </li>
                        <li style="width:100%;">
                            <label style="margin-right: 40px;">
                                <span>商户名称：</span>
                                <select name="storeName" ng-options="v.storeName as v.storeName for v in storeAll"
                                        ng-model="storeAllCode">
                                    <option value="">全部</option>
                                </select>
                            </label>
                            <label>
                                <span>处理状态：</span>
                                <select name="proName" ng-options="v.state as v.state for v in stateList"
                                        ng-model="state">
                                    <option value="">全部</option>
                                </select>
                            </label>
                        </li>


                        <li>
                            <button class="searchBtn" ng-click="searcBtnClick();">搜索</button>
                        </li>
                    </ul>
                </div>

                <div class="merchantList">

                    <!--<ul>-->
                    <!--<li class="storage" ng-click="createNewItemBtn();" style="background-color:rgb(0,153,255) "><img src="img/icon/storage.png" alt="">批量入库</li>-->
                    <!--</ul>-->

                    <table>
                        <tr class="th">
                            <!--<td class="input"><input type="checkbox" ng-model="select_all" ng-change="selectAll()"></td>-->
                            <td>商户名称</td>
                            <td>申请编号</td>
                            <td>申请明细</td>
                            <td>申请时间</td>
                            <td>处理状态</td>
                        </tr>

                        <tr ng-repeat="item in tableData" on-finish-render-filters>
                            <!--<td class="input"><input type="checkbox" ng-model="item.checked" ng-change="selectOne($event)"></td>-->
                            <td>{{item.storeName}}</td>
                            <td>{{item.code}}</td>
                            <td style="color:blue;text-decoration: underline;" ng-click="examine();">查看</td>
                            <td>{{item.createDate}}</td>
                            <td style="color:red;" ng-show="item.auditSign=='N'||item.auditSign == null">未处理</td>
                            <td style="color:green;" ng-show="item.auditSign=='Y'">已处理</td>
                        </tr>

                    </table>
                </div>


                <div ng-show="layerOutShow" class="home_layerOut">
                    <h3 style="text-align: center"><span>{{storeMsg.storeName}} {{storeMsg.createDate}}</span><img
                            ng-click="closeLay();" src="img/icon/cha.png" alt=""></h3>
                    <div class="img"><img src="img/icon/print.png" alt=""></div>
                    <div class="table">
                        <table>
                            <tr class="th">
                                <td>材料品牌</td>
                                <td>材料名称</td>
                                <td>材料分类</td>
                                <td>数量</td>
                            </tr>

                            <tr ng-repeat="item in layRes">
                                <td>{{item.itemBrandCode}}</td>
                                <td>{{item.itemCode}}</td>
                                <td>{{item.itemGroupCode}}</td>
                                <td>{{item.requestQty}}</td>
                            </tr>
                        </table>
                    </div>

                    <button ng-click="putStorage();">一键入库</button>
                </div>

                <!--<div class="home_layerOut home_layerOut2">-->
                <!--<h3 style="text-align: center"><span>系统提示</span><img src="img/icon/important.png" alt=""></h3>-->
                <!--<div>-->
                <!--<h2>是否确定更新入库？</h2>-->
                <!--<ul>-->
                <!--<li>确定</li>-->
                <!--<li>取消</li>-->
                <!--</ul>-->
                <!--</div>-->

                <!--</div>-->

                <div class="paging">
                    <div class="clearfix box-between">
                        <!--<div class="branches fl">-->
                        <!--<select name="" id="">-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">1</option>-->
                        <!--<option value="">4</option>-->
                        <!--</select>-->
                        <!--<span>条 / 页</span>-->
                        <!--</div>-->

                        <div class="page fl">
                            <span class="fl pageTurn prev" ng-click="firstPageBtn();">首页</span>
                            <span class="fl pageTurn prev" ng-click="prevPageBtn();">上一页</span>
                            <!--<ul class="fl">-->
                            <!--<li>1</li>-->
                            <!--<li>2</li>-->
                            <!--<li>3</li>-->
                            <!--<li>4</li>-->
                            <!--<li>5</li>-->
                            <!--<li>6</li>-->
                            <!--<li>7</li>-->
                            <!--<li>8</li>-->

                            <!--</ul>-->
                            <div class="pageTo fl">
                                <p>转到 <input type="text" ng-model="page1" ng-keyup="myKeyup13($event)"> 页</p>
                            </div>
                            <span class="fl pageTurn next" ng-click="nextPageBtn();">下一页</span>
                            <span class="fl pageTurn next toLast" ng-click="lastPageBtn();">尾页</span>
                            <p class="fl">共 <span>{{pageMsg.totalPages}}</span> 页 /
                                <span>{{pageMsg.totalElements}}</span> 条数据</p>
                        </div>
                    </div>


                </div>

            </div>


        </div>


    </div>

</div>

</div>
<div ng-include="'tpl/base/web/bottom.html'"></div>